/*
 * @Copyright: 2017 www.yyfax.com Inc. All rights reserved.
 */
package com.yyfax.pay.order.data.service;

import com.yyfax.framework.exception.YYException;
import com.yyfax.pay.order.model.po.PayoutBatchOrderPO;
import com.yyfax.pay.order.model.vo.PayBusiIdVO;
import com.yyfax.pay.order.model.vo.PayoutBatchOrderVO;

/**
 * 批量代付订单服务接口
 *
 * @author buyi
 * @date 2017-04-12 11:09:15
 * @since 1.0.0
 */
public interface PayoutBatchOrderService {
	/**
	 * 根据主键查询实体
	 *
	 * @author buyi
	 * @date 2017年4月3日上午1:28:16
	 * @since 1.0.0
	 * @param id 主鍵
	 * @param merchantCode 商户编号(分表预留参数)
	 * @return
	 * @throws Exception
	 */
	public PayoutBatchOrderPO queryByIdAndMerchantCode(int id, String merchantCode) throws Exception;

	/**
	 * 查询批量代付信息
	 * 
	 * @author buyi
	 * @date 2017-04-20 10:45:12
	 * @since v1.0.0
	 * @param merchantCode
	 * @param orderId
	 * @return
	 * @throws Exception
	 */
	public PayoutBatchOrderPO queryByMerchantCodeAndOrderId(String merchantCode, String orderId) throws Exception;

	/**
	 * 保存实体对象,并返回业务主键
	 *
	 * @author buyi
	 * @date 2017年4月3日上午1:28:22
	 * @since 1.0.0
	 * @param po 实体对象
	 * @return
	 * @throws Exception
	 */
	public String saveAndReturnBusiKey(PayoutBatchOrderPO po) throws Exception;

	/**
	 * 解析批量代付业务主键
	 * 
	 * @author buyi
	 * @date 2017-04-20 09:42:08
	 * @since v1.0.0
	 * @param payoutBatchOrderId
	 * @return
	 * @throws YYException
	 */
	public PayBusiIdVO resolverPayoutBatchOrderId(String payoutBatchOrderId) throws YYException;

	/**
	 * 查询批量代付快照类
	 * 
	 * @author buyi
	 * @date 2017-04-20 10:23:58
	 * @since v1.0.0
	 * @param orderId
	 * @param merchantCode
	 * @return
	 * @throws Exception
	 */
	public PayoutBatchOrderVO queryPayoutBatchOrderVO(String merchantCode, String orderId) throws Exception;

	/**
	 * 更新批量代付信息
	 * 
	 * @author buyi
	 * @date 2017-04-22 13:36:11
	 * @since v1.0.0
	 * @param payoutBatchOrderPO
	 * @return
	 * @throws Exception 
	 */
	public int modify(PayoutBatchOrderPO payoutBatchOrderPO) throws Exception;

}
